A motor with built-in brake having a brake mechanism associated with the rotor shaft has conventionally been used. The brake mechanism of a motor with a built-in brake is constituted so that the rotation of the rotor is braked by pressing a brake pad with a spring pressure against a brake disk secured to the rotor shaft. The rotor is released by disengaging the brake pad from the brake disk through the excitation of a DC electromagnet. Such a brake mechanism includes a brake disk, a brake pad, a braking spring or springs, and a DC electromagnet for disengaging the brake is disposed coaxially with the rotor within a case at the front end or at the rear end of the motor. In such a brake mechanism, the DC electromagnet is disposed near the rotor shaft. Therefore, a leakage flux flows as far as to the part of the rotor shaft extending outside the motor when the rotor shaft is formed of a material, such as a carbon steel, which is easily workable and has high mechanical strength and magnetic conductivity. Consequently, when such an electric motor with a DC brake is employed as the driving source of a machine tool, powder of magnetic materials, such as iron powder, adheres to the projecting part of the rotor shaft, adversely affecting the mechanical connection between the projecting part of the rotor shaft and the associated driven body. When a revolution detector is provided on the rotor shaft of the motor for the servocontrol of the motor, the leakage flux adversely affects the revolution detector by causing errors in detecting revolutions and deteriorating the detecting accuracy. Accordingly, in some cases, a rotor shaft of a nonmagnetic material, such as a stainless steel, is employed in an electric motor with a DC brake. However, nonmagnetic materials, including stainless steels, in general are hard to work. It is difficult and costly to work such a material to form a rotor shaft. In addition, nonmagnetic materials are comparatively expensive.